import http from '../request.js'

// 获取验证码
let validateCode = (url, params,responseType) => {
    return http.req1(
        'get',
        url = 'validateCode',
        params,
        null,
        'blob'
    )
}

// 获取用户信息
let userInfo = (url) => {
    return http.req(
        'get',
        url = 'auth/getUserInfo',
        null,
        null
    )
}

// 登录
let login = (url, data) => {
    return http.req(
        'post',
        url = 'login',
        null,
        data
    )
}

// 更改用户信息
let userUpdate = (url,data) => {
    return http.req(
        'post',
        url = 'auth/update',
        null,
        data
    )
}

export default {
    validateCode,
    userInfo,
    login,
    userUpdate
}